package main

func Map() {
	//直接初始化
	m1 := map[string]int{
		"a": 1,
		"b": 2,
		"c": 3,
		"d": 4}
	//容量
	//m2 := make(map[string]int, 12)

	val, ok := m1["a"]
	if ok {
		//有这个键值对
		println(val)
	}
	val = m1["q"]
	println("b对应的值", val)
	delete(m1, "a")
}
